#指定最小cmake版本
cmake_minimum_required(VERSION 3.10)

#设置项目名称
project(demo)

#设置变量
set(RAYLIB_PATH ${PROJECT_SOURCE_DIR}/libs/raylib)
set(TARGET main)
# 包含头文件目录
include_directories(${PROJECT_SOURCE_DIR}/includes)
include_directories(${PROJECT_SOURCE_DIR}/includes/raylib)

#设置c++标准
set(CMAKE_CXX_STANDARD 20)

#寻找raylib库
find_library(RAYLIB_LIB
    NAMES
        libraylib
        libraylibdll
        raylib
    PATHS ${RAYLIB_PATH}/lib
    REQUIRED
)

file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS
    "src/*.cpp"
    "src/*.c" 
    LIST_DIRECTORIES false#不列出目录
)

    #生成可执行文件
    add_executable(main ${SRC_FILES}) 

    #链接库
    target_link_libraries(main ${RAYLIB_LIB} opengl32 winmm imm32 gdi32)



